<?php

namespace app\site\controller\sys;

use app\model\site\Site;
use app\site\controller\AController;
use app\site\service\SiteAuthService;
use think\Request;

class ConfigController extends AController
{

    /**
     * @throws \app\common\exception\MiException
     */
    public function siteInfoEdit(Request $request){
        if ($request->isPost()){
            $post = $this->post();
            $siteId = SiteAuthService::instance()->getSiteId();
            $info = Site::update($post, ['id' => $siteId]);

            return jsonSuccess([
                'info' => $info,
            ]);
        }
    }
}
